<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="UTF-8">
    <title>优选之星调仓管理</title>
</head>
<style>
    /*.main {
        !*text-align: center; !*让div内部文字居中*!*!
        background-color: #fff;
        border-radius: 20px;
        width: 300px;
        height: 350px;
        margin: auto;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }*/

    #Yxlist {
        margin: 15px 0px 15px 0px;
    }

</style>
<script th:src="jquery-1.8.3.min.js"></script>

<body>
<div class="main">
    <h1>当前优选之星列表</h1>
    <div>
        <button onclick="getYxTiaocang()">获取</button>
        <div id="Yxlist"></div>
    </div>
    <hr>
    <h1>调仓管理</h1>
    <form action="#" th:action="@{/saveTiaocang}" th:object="${tcrecord}" method="post">
        <p>基金代码：<input type="text" th:field="*{fundcode}"/></p>
        <p>基金名称：<input type="text" th:field="*{fundname}"/></p>
        <p>状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态：
            <input type="radio" th:field="*{status}" th:value="0"/>调出
            <input type="radio" th:field="*{status}" th:value="1"/>调入
        </p>
        <p>优&nbsp;&nbsp;先&nbsp;&nbsp;级：
            <input type="radio" th:field="*{level}" th:value="1"/>一等
            <input type="radio" th:field="*{level}" th:value="2"/>二等
            <input type="radio" th:field="*{level}" th:value="0"/>其他
        </p>
        <p>调仓理由：<input type="text" th:field="*{reason}"/></p>
        <p>
            <input type="submit" value="提交"/>
            <input type="reset" value="重置"/>
        </p>
    </form>


</div>
</body>
<script>
    function getYxTiaocang() {
        $.ajax({
            url: '/myfund/getYxTiaocang',
            method: 'post',
            dataType: 'JSON',
            success: function (response) {
                // console.log(response);
                $("#Yxlist").get(0).innerHTML = response
            },
            error: function (data) {
            }
        });
    }

</script>
</html>